<!DOCTYPE html>
<html>
<head>
<title>forget_pwd</title>
<@s.css 'login.css' />
<@s.script ['jquery-1.7.2.min.js','jquery.form.js','jquery.validator.js'] />
<script type='text/javascript'>
<!--
$(document).ready(function(){
	$('#forget_pwd_form').validator({
	    msgHandler: function(msgs){
	        $.map(msgs, function(msg){
	        	showMessage(msg,"fail");
	        });
	    }
	});
	$('#loginMail').focus();
	$('#forget_pwd_form').ajaxForm({
	    dataType:"json",
	    success: function(json) {
	    	$('#loginPwd').val("");
    		$("#captcha").val("");
    		$('#captchaImage').attr('src','/security/captcha.htm?_='+Math.random());
	    	if(json.state){
	    		showMessage(json.message,"success");
	    	}else{
	    		showMessage(json.message,"fail");
	    	}
	    }
	});
})
//-->
</script>
</head>
<body>
	<div class="m-form">
		<form name="forget_pwd_form" id="forget_pwd_form" action="<@s.url '/auth/forget_pwd.htm' />" method="post" >
			<h1>账户登录</h1>
			<div class="formitm">
				<label class="lab">邮箱：</label>
				<div class="ipt">
					<input type="text" name="loginMail" id="loginMail" data-rule="邮箱:required;email" placeholder="请输入您在找回密码的邮箱"  /> <a href="javascript:;">注册账号</a>
				</div>
			</div>
			<div class="formitm">
				<label class="lab">验证码：</label>
				<div class="ipt">
					<input type="text" name="captcha" data-rule="验证码:required"  placeholder="验证码"  style="width: 100px;" id="captcha"/>
					<a href="javascript:;" onclick="$('#captchaImage').attr('src','/security/captcha.htm?_='+Math.random());">看不清？换一张</a>
					<p class="tip">
						<@s.captcha />
					</p>
				</div>
			</div>
			<div class="formitm formitm-submit">
				<button class="u-btn" type="submit">发送找回密码邮件</button>
			</div>
		</form>
		<@s.message />
	</div>

</body>
</html>